package com.zto.wk.controller;

import com.zto.wk.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wangkuan at 2018-11-07 20:36
 */
@RestController
@RequestMapping("home")
public class HomeController {

    @Autowired
    private HomeService homeService;

    @RequestMapping("test1")
    public ResponseEntity<String> get1(int i) {
        return ResponseEntity.ok(homeService.getTime(i));
    }

    @RequestMapping("test2")
    public ResponseEntity<String> get2(int i) {
        return ResponseEntity.ok(homeService.getTime2(i));
    }
}
